import request from '@/utils/request1'

// 新增员工
export function addEmployee(data) {
  return request({
    url: '/employee/addEmployee',
    method: 'POST',
    data
  })
}

// 修改员工信息
export function changeEmployee(data) {
  return request({
    url: '/employee/changeEmployeeInfo',
    method: 'POST',
    data
  })
}

// 删除员工
export function delEmployee(data) {
  return request({
    url: '/employee/del',
    method: 'POST',
    data
  })
}

// 根据ID获取信息
export function findInfoById(params) {
  return request({
    url: '/employee/findInfoById',
    method: 'POST',
    params
  })
}

// 员工列表查询
export function getListEmployee(params) {
  return request({
    url: '/employee/getListEmployeeByParam',
    method: 'post',
    params
  })
}

// 模糊查询团队下拉信息
export function selectTeam(params) {
  return request({
    url: '/administrative/teams/getTeamIdAndNameListByName',
    method: 'post',
    params
  })
}

// 以excel格式批量导入反馈信息
export function downloadRoster(data) {
  return request({
    url: '/employee/batchInsertEmployeesInfo',
    method: 'POST',
    data
  })
}

// 导出
export function exportEmployeeExcel(params) {
  return request({
    url: '/employeeExcel/export',
    method: 'POST',
    params
  })
}

// 人事调动总人数详情
export function getList(params) {
  return request({
    url: '/employee/home/list',
    method: 'post',
    params
  })
}
